package com.me.components {
	import com.me.FileLoader;

	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.filesystem.File;
	import flash.geom.Point;
	import flash.text.TextField;

	/**
	 *
	 * @author yw
	 *
	 * @Date 2011-9-16 下午03:48:48
	 */
	public class Scene extends MapResource {
		public var BMD_BACK:Bitmap;
		public var BMD_MIDDLE:Bitmap;
		public var BMD_TOP:Bitmap;
		public var BMD_NAME:Bitmap;

		public function Scene(file:File, handler:Function) {
			super();
			_fileName = file.name;
			_loadCompleteHandler = handler;
			FileLoader.getInstance().loadFile(file, fileLoaded);
		}

		private function fileLoaded(data:Object):void {
			try {
				BMD_BACK = data.Map_lowlowback;
				BMD_MIDDLE = data.Map_back;
				BMD_TOP = data.Map_proback;
				BMD_NAME = data.Map_name;
				_loadCompleteHandler(this);
			} catch (e:Error) {

			}
		}
	}
}
